The invention relates to a network user station, which can be connected with another network user station and which, in a transmitting mode, transmits telegrams to the other network user station and in a receiving mode receives telegrams from the other network user station. These telegrams contain messages of identical message length in a message string. One of these messages is a time message provided with a time of day.
Such a network user station is known from the Siemens catalog ST 70, chapter 12, 1997 edition. This network user station is suitable for use in a distributed automation system including a plurality of automation components, which must be synchronized for controlling a technical process in accordance with an automation task. To this end, a time transmitter connected to the network cyclically transmits via broadcasting or multicasting a time message which forms part of a message string comprising a plurality of messages. The automation components use this transmitted time message to synchronize their clocks. Due to different dwell times of a time message in the transmitter and/or receiver of the network user station, it can occur that the times stored in the time message are erroneous with respect to the transmittal and/or receive time in the transmitting and/or receiving mode.
One object of the invention is thus to create a network user station of the initially mentioned type which substantially prevents inaccuracies with respect to a transmittal and/or processing instant of the time of day.
This and other objects are solved providing an algorithm and/or a component, which in transmitting mode records a first delay time between the instant when the time message is input in the message string and the instant when transmission of the time message begins, and which adjusts the time of the time message corresponding to this recorded first delay time.
The messages in the message string are processed in the sequence in which they are deposited in said message string. An underlying idea of the invention is to detect the time delay that is caused by a delayed processing of the time message within the message string and accordingly to correct the time stored in the time message. If the network user station operates in a transmitting mode, the algorithm/component of the network user station detects a first delay time between the instant when the time message is entered in the message string and the instant when transmission of the time message starts and adjusts the time stored in the time message based on this detected first delay time. If the network user station operates in a receiving mode, the algorithm/component detects a second delay time between the instant when the time message is received and the instant when the time message is processed and adjusts the time stored in the time message based on this detected second delay time.
This ensures that the time stored in the time message is the correct time of day at the transmitting instant of the time message. It further ensures that the time to be processed in the receiver is the correct time of day at the processing instant.
In preferred embodiments of the invention, the algorithm/component in the transmitting mode provides the time message to be transmitted with an identification code. In a receiving mode the algorithm/component analyzes the code, which indicates to a network user station operating in receiving mode whether the time stored in the time message has been adjusted. This makes it possible for the receiving network user station to introduce corresponding measures, e.g., in such a way that a non-adjusted time of a time message is not further processed.